<?php 
class NguoiDung
{
	var $MaNguoiDung;
	var $TenDangNhap;
	var $MatKhau;
	//hàm lấy người dùng
	public static function LayNguoiDung($TenDangNhap)
	{
		include_once("DataProvider.php");
		//câu truy vấn
		$sql_LayNguoiDung = '
			select *
			from nguoidung
			where tendangnhap = "'.$TenDangNhap.'"
		';
		$result = DataProvider::ExecuteQuery($sql_LayNguoiDung);
		$row = mysql_fetch_array($result);
		$nd = new NguoiDung;
		$nd->MaNguoiDung = $row["MaNguoiDung"];
		$nd->MatKhau = $row["MatKhau"];
		$nd->TenDangNhap = $row["TenDangNhap"];
		return $nd;
	}
}


?>